<div id="container">
<?php if (!$this->allow('list')) : ?>
	<div class="grid_12 t_a_bottom">
		<?php echo $this->translator->translator('Member_Access_deny_desc'); ?>
	</div>
<?php else : 
echo $this->headScript()->setFile($this->baseUrl().'/js/jquery/table-sorter/jquery.dataTables.js');

$group_Info = new Property_Model_DbTable_PropertyGroup();
if(!empty($this->group_id))
{
	$info_group = $group_Info->getGroupName($this->group_id); 
}
$frontController = Zend_Controller_Front::getInstance();
$param_group_id = $frontController->getRequest()->getParam('group_id');
$permission_arr = array('add_enable' => $this->allow('add','backend','Property'), 'edit_enable' => $this->allow('edit','backend','Property'), 'publish_enable' => $this->allow('publish','backend','Property'), 'delete_enable' => $this->allow('delete','backend','Property'), 'featured_enable' => $this->allow('featured','backend','Property'));
?>

<script type="text/javascript">
$(document).ready(function() {
	floatingbar('#floatingbar',"#button_top_bar",null);
	/****************************Sorting Table Start*********************/
	var oTable = $("#sortTable").dataTable({
				"bPaginate": false,
				"bLengthChange": true,
				"bSearchable": true,
				"bFilter": true,
				"bSort": true,
				"bInfo": false,
				"bAutoWidth": true,
				"bProcessing": false,
				"bSortClasses": true,
				"bStateSave": false,
				"bServerSide": false,
				"aaSorting": [[ 2, "asc" ]],				
				"aoColumnDefs": [ 
						{ "bSortable": false, "bSortClasses": false,  "aTargets": [ 0 ] }
					],
				"oLanguage" : { "sSearch": "<?php echo $this->translator->translator('jquery_filter'); ?>" }
			}); 	
	
	$('td', oTable.fnGetNodes()).hover( function() {		
		$(this).parents("tr:first").children('td').addClass( 'highlighted' );
	}, function() {
		$('td.highlighted').removeClass('highlighted');
	} );
	
	/* Get the rows which are currently selected */
	function fnGetSelected( oTableLocal )
	{
		var aReturn = new Array();
		var aTrs = oTableLocal.fnGetNodes();
		
		for ( var i=0 ; i<aTrs.length ; i++ )
		{
			if ( $(aTrs[i]).hasClass('row_selected') )
			{
				aReturn.push( aTrs[i] );
			}
		}
		return aReturn;
	}
	
	/****************************Sorting Table End*********************/
	
		function openMsgDialog(msg)
		{
			$('#dialog_container').html(msg).dialog({
				autoOpen: true,
				modal: true,
				show: 'explode',
				resizable: true,				
				buttons: [{ text: "<?php echo html_entity_decode($this->translator->translator('common_ok'), ENT_QUOTES, 'UTF-8'); ?>", click: function() { $(this).dialog('option', 'hide', 'explode').dialog("close"); } } ],
				open: function(event, ui)
					 {
						setTimeout(function() 
						{									
							if($('#' + event.target.id).dialog('isOpen'))
							{
								$('#' + event.target.id).dialog('option', 'hide', 'explode').dialog('close');										
							}
						}, 10000);
					  }
			});
		}
		
		function deleteThis(self)
		{
			var arr = $(self).attr('rel').split('_');
			$.ajax({
				 url: "<?php echo $this->url( array('module'=> 'Property', 'controller' => 'backend', 'action'     => 'delete' ), 'adminrout',    true) ?>",
				 type: 'POST',
				 data: { id: arr[0], category_name: arr[1], category_thumb:  arr[2]},
				 beforeSend: function(){
						$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/loader/ajax_loader.gif" height="16" border="0" />');
					 },
				 success: function(response) 
				 {
					//alert(response);
					var json_arr = eval("("+response+")");
					if(json_arr.status == 'ok')
					{
						$(self).parents("li:first").parents("ul:first").parents("td:first").parents("tr:first").addClass('row_selected');
						var oTables = $('#sortTable').dataTable();
						var anSelected = fnGetSelected( oTables );
						oTables.fnDeleteRow( anSelected[0] );
					}
				 },
				error: function(xhr, status, error){				
					var msg = "Error! " + xhr.status + " " + error;
					openMsgDialog(msg);
				}
			});
		}
		
		function deleteAll(self)
		{
			var id_str = '';
			for(var i=0;i < $('input.check_btn:checked').length;i++)
			{
				if(i == 0)
				{
					 id_str += $('input.check_btn:checked:eq('+i+')').val();
				}
				else
				{
					id_str += ','+$('input.check_btn:checked:eq('+i+')').val();
				}
			}
			
			$.ajax({
					url: "<?php echo $this->url( array('module'=> 'Property', 'controller' => 'backend', 'action'     => 'deleteall' ), 'adminrout',    true) ?>",
				 	type: 'POST',
				 	data: { id_st: id_str},
					beforeSend: function(){
						$(self).html('<span class="icon loader"></span>');
					 },
					success: function(response) 
				 	{
						//alert(response);
						var json_arr = eval("("+response+")");
						if(json_arr.status == 'ok')
						{
							for(var i= ($('input.check_btn:checked').length-1);i >= 0;i--)
							{								
								$('input.check_btn:checked:eq('+i+')').parents("td:first").parents("tr:first").addClass('row_selected');									
							}
							var oTabled = $('#sortTable').dataTable();
							var anSelected = fnGetSelected( oTabled );
							for(var k = 0; k < anSelected.length; k++)
							{
								oTabled.fnDeleteRow( anSelected[k] );
							}
						}
						else
						{							
							openMsgDialog(json_arr.msg);
						}	
						$(self).html('<span class="icon delete"><?php echo html_entity_decode($this->translator->translator("common_delete_selected"), ENT_QUOTES, "UTF-8"); ?></delete>');
					},
					error: function(xhr, status, error){				
						var msg = "Error! " + xhr.status + " " + error;
						openMsgDialog(msg);
					}
			});	
		}
	
	$('a.delete_btn').click(function() {
		var self = this;
		$("#dialog-confirm").html("<?php echo addslashes($this->translator->translator('category_list_delete_confirm')); ?>").dialog({
			resizable: true,
			width:400,
			height:'auto',
			modal: true,
			show: 'explode',
			hide: 'explode',
			buttons: [{
						text :'<?php echo html_entity_decode($this->translator->translator("common_delete_selected"), ENT_QUOTES, "UTF-8"); ?>', 
						click: function() {
								deleteThis(self);
								$(this).dialog('close');
							}
					},
					{
						text :'<?php echo html_entity_decode($this->translator->translator("common_cancel"), ENT_QUOTES, "UTF-8"); ?>',
						click: function() {
								$(this).dialog('close');
							}
					}]
		});
		
	});
	
	$('a.publish_btn').click(function() {
		var self = this;
		<?php if ($permission_arr['publish_enable']){ ?>		
			var arr = $(self).attr('rel').split('_');
			$.ajax({
				 url: "<?php echo $this->url( array('module'=> 'Property', 'controller' => 'backend', 'action'     => 'publish' ), 'adminrout',    true) ?>",
				 type: 'POST',
				 data: { id: arr[0], category_name: arr[1], paction: arr[2]},
				 beforeSend: function(){
					 $(self).html('<img src="application/modules/Administrator/layouts/scripts/images/loader/ajax_loader.gif" border="0" height="17" />');
				 },
				 success: function(response) 
				 {
					//alert(response);
					var json_arr = eval("("+response+")");
					if(json_arr.status == 'ok')
					{
						if(json_arr.active == '1')
						{
							$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/tools/published.gif" border="0" title="<?php echo $this->translator->translator("common_unpublish_title"); ?>" alt="<?php echo $this->translator->translator("common_unpublish_title"); ?>" />').attr('rel',arr[0]+"_"+arr[1]+"_unpublish");
						}
						else
						{
							$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/tools/unpublished.gif" border="0" title="<?php echo $this->translator->translator("common_publish_title"); ?>" alt="<?php echo $this->translator->translator("common_publish_title"); ?>" />').attr('rel',arr[0]+"_"+arr[1]+"_publish");
						}
					}
					else
					{
						openMsgDialog(json_arr.msg);
					}
				 },
				error: function(xhr, status, error){				
					var msg = "Error! " + xhr.status + " " + error;
					openMsgDialog(msg);
				}
			});
		<?php }else{ ?>
			var msg = "<?php echo $this->translator->translator('common_publish_perm'); ?>";
				openMsgDialog(msg);
		<?php } ?>
	});	
	
	$('a.featured_btn').click(function() {
		var self = this;		
		var arr = $(self).attr('rel').split('_');
		$.ajax({
			 url: "<?php echo $this->url( array('module'=> 'Property', 'controller' => 'backend', 'action'     => 'featured' ), 'adminrout',    true) ?>",
			 type: 'POST',
			 data: { id: arr[0], category_name: arr[1], paction: arr[2]},
			 beforeSend: function(){
					$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/loader/ajax_loader.gif" border="0" height="16" />');
				 },
			 success: function(response) 
			 {
			 	//alert(response);
			 	var json_arr = eval("("+response+")");
				if(json_arr.status == 'ok')
				{
					if(json_arr.featured == '1')
					{
						$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/tools/featured.gif" border="0" title="<?php echo $this->translator->translator("common_unfeature_title"); ?>" />').attr('rel',arr[0]+"_"+arr[1]+"_unfeatured");
					}
					else
					{
						$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/tools/unfeatured.gif" border="0" title="<?php echo $this->translator->translator("common_feature_title"); ?>" />').attr('rel',arr[0]+"_"+arr[1]+"_featured");
					}
			 	}
				else
				{
					openMsgDialog(json_arr.msg);
				}
			 },
			error: function(xhr, status, error){				
				var msg = "Error! " + xhr.status + " " + error;
				openMsgDialog(msg);
			}
		});
	});
	
	$('a.up_btn').click(function() {
		var self = this;				
		var arr = $(self).attr('rel').split('_');		
		var prev_order = $(self).parents("td:first").children("input:nth-child(1)").val();		
		$.ajax({
				 url: "<?php echo $this->url( array('module'=> 'Property', 'controller' => 'backend', 'action'     => 'up' ), 'adminrout',    true) ?>",
				 type: 'POST',
				 data: { id: arr[0], category_order: prev_order},
				 beforeSend: function(){
					$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/tools/up-animation.gif" border="0" />');
				 },
				 success: function(response) 
				 {
				 	 //alert(response);
					var json_arr = eval("("+response+")");
					if(json_arr.status == 'ok')
					{
						$(self).parents("td:first").children("input:nth-child(1)").val((prev_order-1));
						if(json_arr.id_arr != '' && json_arr.id_arr != null)
						{
							for(var i = 0; i < json_arr.id_arr.length; i++)
							{
								for(var j=0;j < $('a.up_btn').length ;j++)
								{
									var arrUp = $('a.up_btn:eq('+j+')').attr('rel').split('_');									
									if(arrUp[0] == json_arr.id_arr[i])	
									{										
										$('a.up_btn:eq('+j+')').parents("td:first").children("input:nth-child(1)").val(prev_order);
									}					
								}
							}							
						}						
					}
					else
					{
						openMsgDialog(json_arr.msg);
					}
					$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/tools/up-arrow.gif" border="0" />');
				 }
			});
	});	
	
	$('a.down_btn').click(function() {
		var self = this;				
		var arr = $(self).attr('rel').split('_');		
		var prev_order = $(self).parents("td:first").children("input:nth-child(1)").val();		
		
		$.ajax({
				 url: "<?php echo $this->url( array('module'=> 'Property', 'controller' => 'backend', 'action'     => 'down' ), 'adminrout',    true) ?>",
				 type: 'POST',
				 data: { id: arr[0], category_order: prev_order},
				 beforeSend: function(){
					$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/tools/down-animation.gif" border="0" />');
				 },
				 success: function(response) 
				 {
				 	// alert(response);
					var json_arr = eval("("+response+")");
					if(json_arr.status == 'ok')
					{
						var new_order = parseInt(prev_order) + 1;
						$(self).parents("td:first").children("input:nth-child(1)").val(new_order);
						if(json_arr.id_arr != '' && json_arr.id_arr != null)
						{
							for(var i = 0; i < json_arr.id_arr.length; i++)
							{
								for(var j=0;j < $('a.up_btn').length ;j++)
								{
									var arrUp = $('a.up_btn:eq('+j+')').attr('rel').split('_');									
									if(arrUp[0] == json_arr.id_arr[i])	
									{										
										$('a.up_btn:eq('+j+')').parents("td:first").children("input:nth-child(1)").val(prev_order);
									}					
								}
							}							
						}						
					}
					$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/tools/down-arrow.gif" border="0" />');
				 }
			});
	});
	
	
	$('a.all_order_btn').click(function() {
		var self = this;
		var category_order_str = '';
		var id_str = '';
		for(var i=0;i<$('input.category_order_text').length;i++)
		{
			if(i == 0)
			{
				category_order_str += $('input.category_order_text:eq('+i+')').val();
				id_str += $('input.category_order_text:eq('+i+')').parents("td:first").children("a:first").attr('rel');
			}
			else
			{
				category_order_str += ','+$('input.category_order_text:eq('+i+')').val();
				id_str += ','+$('input.category_order_text:eq('+i+')').parents("td:first").children("a:first").attr('rel');
			}
		}
		
		$.ajax({
				 url: "<?php echo $this->url( array('module'=> 'Property', 'controller' => 'backend', 'action'     => 'orderall' ), 'adminrout',    true) ?>",
				 type: 'POST',
				 data: { id_arr: id_str, category_order_arr: category_order_str},
				 beforeSend: function(){
				 	oTable.fnSettings().aoColumns[5].bSortable = false;
					$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/loader/ajax_loader.gif" height="16" border="0" />');
				 },
				 success: function(response) 
				 {
				 	//alert(response);
					var json_arr = eval("("+response+")");
					openMsgDialog(json_arr.msg);
					$(self).html('<img src="application/modules/Administrator/layouts/scripts/images/tools/save.png" border="0" />');
				 	oTable.fnSettings().aoColumns[5].bSortable = true;
				 }
		});
	});
	
	$('a.publish_all').click(function() {
		var self = this;
		<?php if ($permission_arr['publish_enable']){ ?>	
			var bigrel = $(self).attr('rel');
			if($('input.check_btn:checked').length > 0)
			{
				var id_str = '';
				for(var i=0;i < $('input.check_btn:checked').length;i++)
				{
					if(i == 0)
					{
						 id_str += $('input.check_btn:checked:eq('+i+')').val();
					}
					else
					{
						id_str += ','+$('input.check_btn:checked:eq('+i+')').val();
					}
				}
				
				$.ajax({
						url: "<?php echo $this->url( array('module'=> 'Property', 'controller' => 'backend', 'action'     => 'publishall' ), 'adminrout',    true) ?>",
						type: 'POST',
						data: { id_st: id_str, paction: bigrel},
						beforeSend: function(){
							$(self).html('<span class="icon loader"></span>');
						 },
						success: function(response) 
						{
							//alert(response);
							var json_arr = eval("("+response+")");
							if(json_arr.status == 'ok')
							{
								if(bigrel=='publish')
								{
									for(var i=0;i < $('input.check_btn:checked').length;i++)
									{								
										var rel = $('input.check_btn:checked:eq('+i+')').parents("td:first").parents("tr:first").children("td:nth-child(8)").children("a:nth-child(1)").attr('rel');
										var rel_arr = rel.split('_');
										var new_rel = rel_arr[0]+'_'+rel_arr[1]+'_unpublish';
										$('input.check_btn:checked:eq('+i+')').parents("td:first").parents("tr:first").children("td:nth-child(8)").children("a:nth-child(1)").attr('rel',new_rel);
										$('input.check_btn:checked:eq('+i+')').parents("td:first").parents("tr:first").children("td:nth-child(8)").children("a:nth-child(1)").html('<img src="application/modules/Administrator/layouts/scripts/images/tools/published.gif" border="0" title="<?php echo $this->translator->translator("common_unpublish_title"); ?>" alt="<?php echo $this->translator->translator("common_unpublish_title"); ?>" />');								
									}
								}
								else
								{
									for(var i=0;i < $('input.check_btn:checked').length;i++)
									{								
										var rel = $('input.check_btn:checked:eq('+i+')').parents("td:first").parents("tr:first").children("td:nth-child(8)").children("a:nth-child(1)").attr('rel');
										var rel_arr = rel.split('_');
										var new_rel = rel_arr[0]+'_'+rel_arr[1]+'_publish';
										$('input.check_btn:checked:eq('+i+')').parents("td:first").parents("tr:first").children("td:nth-child(8)").children("a:nth-child(1)").attr('rel',new_rel);
										$('input.check_btn:checked:eq('+i+')').parents("td:first").parents("tr:first").children("td:nth-child(8)").children("a:nth-child(1)").html('<img src="application/modules/Administrator/layouts/scripts/images/tools/unpublished.gif" border="0" title="<?php echo $this->translator->translator("common_publish_title"); ?>" alt="<?php echo $this->translator->translator("common_publish_title"); ?>" />');								
									}	
								}
							}
							else
							{
								openMsgDialog(json_arr.msg);
							}	
							if(bigrel=='publish')
							{	
								$(self).html('<span class="icon publish"><?php echo $this->translator->translator("common_publish_selected"); ?></span>');
							}
							else
							{
								  $(self).html('<span class="icon unpublish"><?php echo $this->translator->translator("common_unpublish_selected"); ?></span>');
							}
						},
						error: function(xhr, status, error){
							var msg = "Error! " + xhr.status + " " + error;
							openMsgDialog(msg);
						}
				});			
			}
			else
			{
				var msg = "<?php echo $this->translator->translator('category_selected_err'); ?>";
				openMsgDialog(msg);
			}
		<?php }else{ ?>
			var msg = "<?php echo $this->translator->translator('common_publish_perm'); ?>";
				openMsgDialog(msg);
		<?php } ?>
	});
		
	$('a.delete_all').click(function() {
		var self = this;
		if($('input.check_btn:checked').length > 0)
		{
			$("#dialog-confirm").html("<?php echo addslashes($this->translator->translator('category_list_delete_confirm')); ?>").dialog({
				resizable: true,
				width:400,
				height:'auto',
				modal: true,
				show: 'explode',
				hide: 'explode',
				buttons: [{
							text :'<?php echo html_entity_decode($this->translator->translator("common_delete_selected"), ENT_QUOTES, "UTF-8"); ?>', 
							click: function() {
									deleteAll(self);
									$(this).dialog('close');
								}
						},
						{
							text :'<?php echo html_entity_decode($this->translator->translator("common_cancel"), ENT_QUOTES, "UTF-8"); ?>',
							click: function() {
									$(this).dialog('close');
								}
						}]
			});		
		}
		else
		{
			var msg = "<?php echo $this->translator->translator('category_selected_err'); ?>";
			openMsgDialog(msg);
		}
	});
	
	$('input.checkAll_btn').click(function() {
		var self = this;
		if($(self).is(':checked'))
		{		
			$('input.check_btn').attr('checked', true);
		}
		else
		{
			$('input.check_btn').attr('checked', false);
		}
	});
	
/************************************************IMAGE THUMBNIL************************************************/
	$("span.thumb").hover(function() {
		$(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/ 
		$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
			.animate({
				marginTop: '-110px', /* The next 4 lines will vertically align this image */ 
				marginLeft: '-110px',
				top: '50%',
				left: '50%',
				width: '174px', /* Set new width */
				height: '174px', /* Set new height */
				padding: '20px'
			}, 200); /* this value of "200" is the speed of how fast/slow this hover animates */
	
		} , function() {
		$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
		$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
			.animate({
				marginTop: '-3px', /* Set alignment back to default */
				marginLeft: '0',
				top: '0',
				left: '0',
				width: '30px', /* Set width back to default */
				height: '20px', /* Set height back to default */
				padding: '5px'
			}, 400);
	});
	
	
});
</script>



<div class="title-container">
	<div class="property-cat"><h1><?php echo $this->translator->translator('property_category_list_page_name'); ?> <?php if(!empty($this->group_id)){ echo ' ('.$this->escape($info_group['property_name']).')'; } ?></h1></div>
    
    <div class="button-container">
        <?php if ($permission_arr['add_enable']) : ?>
        <span class="button  ui-widget-content-1"><a href="<?php echo $this->url(array('module'=> 'Property','controller'=>'backend', 'action'=>'add','group_id' => $param_group_id),'adminrout',true);?>"><span class="icon add"><?php echo $this->translator->translator('common_add'); ?></span></a></span>
        <?php endif; ?>
        
        <?php if ($permission_arr['publish_enable']) : ?>
        <span class="button  ui-widget-content-1"><a href="javascript: void(0);" rel="publish" class="publish_all"><span class="icon publish"><?php echo $this->translator->translator('common_publish_selected'); ?></span></a></span>
        <?php endif; ?>
        
        <?php if ($permission_arr['publish_enable']) : ?>
        <span class="button  ui-widget-content-1"><a href="javascript: void(0);" rel="unpublish" class="publish_all"><span class="icon unpublish"><?php echo $this->translator->translator('common_unpublish_selected'); ?></span></a></span>
        <?php endif; ?>
        
        <?php if ($permission_arr['delete_enable']) : ?>
        <span class="button  ui-widget-content-1"><a href="javascript: void(0);" class="delete_all"><span class="icon delete"><?php echo html_entity_decode($this->translator->translator("common_delete_selected"), ENT_QUOTES, "UTF-8"); ?></span></a></span>
        <?php endif; ?>
    </div>
</div>
<div id="button_top_bar"></div>
<div class="content-container">
	<div id="sidebar-inner">
    	<?php echo $this->partial('nav_menu.phtml');  ?>
    </div>
    
    	
    <div id="content-inner">
    	<div class="pagination">
    		<?php echo $this->paginationControl($this->datas, 'Sliding', 'top_pagination.phtml'); ?>
        </div>
        
        <div class="chart">
        	<div class="data-table">
            	<table id="sortTable" width="100%" align="center" cellpadding="0" cellspacing="0">
			    <thead>
						<tr>
						  <th width="2%" class="center"><input type="checkbox" name="checkAll" id="checkAll" class="checkAll_btn" /></th>
						 	<th width="4%"><?php echo $this->translator->translator('property_category_list_page_id'); ?></th>
					  	  <th width="20%"><?php echo $this->translator->translator('property_category_list_page_grp'); ?> </th>
					  	  <th width="5%"><?php echo $this->translator->translator('property_category_list_page_thumb'); ?> </th>
	   	          <th width="30%"><?php echo $this->translator->translator('property_category_list_page_cat_name'); ?></th>
							<th width="9%">
								<?php echo $this->translator->translator('common_order'); ?>
								<a href="javascript: void(0);" class="all_order_btn"><img src="application/modules/Administrator/layouts/scripts/images/tools/save.png" border="0" /></a>		
					  	  </th>
						  <th width="8%"><?php echo $this->translator->translator('common_date'); ?></th>
					  	  <th width="8%"><?php echo $this->translator->translator('common_status'); ?></th>
						 
						  	<th width="17%"><?php echo $this->translator->translator('common_action'); ?></th>
						</tr>
				  </thead>
					<tbody>
						<?php 
						$mem_db = new Members_Model_DbTable_MemberList();
						$j = 1;
						foreach ($this->datas as $entry): 
							if($j % 2 == 0)
							{
								$onmouseout = "this.bgColor='#FFFFFF';";
								$background = '#FFFFFF';
							}
							else
							{
								$onmouseout = "this.bgColor='#F7F7F7';";
								$background = '#F7F7F7';
							}
						?>
							<tr bgcolor="<?php echo $background; ?>" onmouseover="this.bgColor='#FCF5DD';" onmouseout="<?php echo $onmouseout; ?>">
						 		<td class="center checkbox"><input type="checkbox" name="checkbtn" id="checkbtn" value="<?php echo $this->escape($entry->id); ?>" class="check_btn" /></td>
						  		<td class="center"><?php echo $this->escape($entry->id); ?></td>
						  		<td>
									<?php
										$member_info = $mem_db->getMemberInfo($this->escape($entry->entry_by));
										$property_name = $group_Info->getGroupName($this->escape($entry->group_id));
										$link_url = $this->url(array('module' => 'Property', 'controller' => 'Backendpro', 'action' => 'list', 'group_id' => $this->escape($entry->group_id)),'adminrout',true);
										echo '<div class="gallery-label">'.$this->escape($property_name['property_name']).'</div><div class="gallery-browse"><a href="'.$link_url.'"><img src="application/modules/Administrator/layouts/scripts/images/tools/browse_item.gif" border="0" class="myTooltip" alt="'.$this->translator->translator('hotels_click_view_product',$this->escape($property_name['property_name'])).'" title="'.$this->translator->translator('property_click_view_product',$this->escape($property_name['property_name'])).'" /></a></div>';
						  			?>
                              	</td>
						  		<td class="center"><?php if($entry->category_thumb){ ?><span class="thumb"><img src="data/frontImages/property/category_thumb/<?php echo $this->escape($entry->category_thumb); ?>" width="30" height="20" /></span><?php } ?></td>
						  		<td><?php echo $this->escape($entry->category_name); ?></td>
						  		<td>
									<input type="text" size="1" name="category_order" id="category_order" class="category_order_text" value="<?php echo $this->escape($entry->category_order); ?>" />
									<a href="javascript: void(0);" rel="<?php echo $this->escape($entry->id); ?>" class="up_btn"><img src="application/modules/Administrator/layouts/scripts/images/tools/up-arrow.gif" border="0" /></a>&nbsp;<a href="javascript: void(0);" rel="<?php echo $this->escape($entry->id); ?>" class="down_btn"><img src="application/modules/Administrator/layouts/scripts/images/tools/down-arrow.gif" border="0" /></a>		
						  		</td>
						   		<td class="center" title="<strong><?php echo $this->translator->translator('common_date'); ?> : </strong><?php echo $this->escape($entry->cat_date); ?><br /><strong><?php echo $this->translator->translator('common_entry'); ?> :</strong> <?php echo $this->escape($member_info['username']); ?>"><?php echo strftime('%Y-%m-%d',strtotime($this->escape($entry->cat_date))); ?></td>
						  		<td class="center"><a href="javascript:void(0);" class="publish_btn" rel="<?php echo $this->escape($entry->id); ?>_<?php echo $this->escape($entry->category_name); ?>_<?php if($this->escape($entry->active) == '1'){ ?>unpublish<?php }else{ ?>publish<?php } ?>"><?php if($this->escape($entry->active) == '1'){ ?><img src="application/modules/Administrator/layouts/scripts/images/tools/published.gif"  border="0" title="<?php echo $this->translator->translator('common_unpublish_title'); ?>" alt="<?php echo $this->translator->translator('common_unpublish_title'); ?>" /><?php }else{ ?><img src="application/modules/Administrator/layouts/scripts/images/tools/unpublished.gif" border="0" title="<?php echo $this->translator->translator('common_publish_title'); ?>" alt="<?php echo $this->translator->translator('common_publish_title'); ?>" /><?php } ?></a></td>
						  
						  		<td class="tools-list">
                               		<ul>
                                    	<li>
										<?php if ($permission_arr['edit_enable'])  : ?>
										<a href="<?php echo $this->url( array('module'=> 'Property', 'controller' => 'backend', 'action'     => 'edit', 'id' => $this->escape($entry->id),'group_id' => $this->escape($entry->group_id) ), 'adminrout',    true) ?>"><img src="application/modules/Administrator/layouts/scripts/images/tools/edit.png" title="<?php echo $this->translator->translator('common_edit_title'); ?>" border="0" /></a>
										<?php endif; ?>
                                      	</li>
                                        
										<li>
										<?php if ($permission_arr['delete_enable']) : ?>
										<a href="javascript:void(0);" class="delete_btn"  rel="<?php echo $this->escape($entry->id); ?>_<?php echo $this->escape($entry->category_name); ?>_<?php echo $this->escape($entry->category_thumb); ?>"><img src="application/modules/Administrator/layouts/scripts/images/tools/delete.png" title="<?php echo $this->translator->translator('common_delete_title'); ?>" border="0" /></a>
										<?php endif; ?>
                                        </li>
                                        
                                        <li>
										<?php if ($permission_arr['featured_enable']) : ?>
										<a href="javascript:void(0);" class="featured_btn" rel="<?php echo $this->escape($entry->id); ?>_<?php echo $this->escape($entry->category_name); ?>_<?php if($this->escape($entry->featured) == '1'){ ?>unfeatured<?php }else{ ?>featured<?php } ?>"><?php if($this->escape($entry->featured) == '1'){ ?><img src="application/modules/Administrator/layouts/scripts/images/tools/featured.gif" border="0" title="<?php echo $this->translator->translator('common_unfeature_title'); ?>" /><?php }else{ ?><img src="application/modules/Administrator/layouts/scripts/images/tools/unfeatured.gif" border="0" title="<?php echo $this->translator->translator('common_feature_title'); ?>" /><?php } ?></a>
										<?php endif; ?>
                                        </li>
                                  	</ul>
								</td>
							</tr>
						<?php 
							echo Property_View_Helper_SubCategory::getSubCategory($this->escape($entry->id),$this,$group_Info,'&nbsp;&nbsp;|____',$j);
							$j++;
							endforeach;	
						?>
					</tbody>
				</table>
          	</div>
		</div>
        
        <div class="pagination">
    		<?php echo $this->paginationControl($this->datas, 'Sliding', 'pagination.phtml'); ?>
        </div>        
 	</div>
</div>

<div id="floatingbar">
	<h1><?php echo $this->translator->translator('property_category_list_page_name'); ?> <?php if(!empty($this->group_id)){ echo ' ('.$this->escape($info_group['property_name']).')'; } ?></h1>
    
    <div class="button-container">
        <?php if ($permission_arr['add_enable']) : ?>
        <span class="button  ui-widget-content-1"><a href="<?php echo $this->url(array('module'=> 'Property','controller'=>'backend', 'action'=>'add','group_id' => $param_group_id),'adminrout',true);?>"><span class="icon add"><?php echo $this->translator->translator('common_add'); ?></span></a></span>
        <?php endif; ?>
        
        <?php if ($permission_arr['publish_enable']) : ?>
        <span class="button  ui-widget-content-1"><a href="javascript: void(0);" rel="publish" class="publish_all"><span class="icon publish"><?php echo $this->translator->translator('common_publish_selected'); ?></span></a></span>
        <?php endif; ?>
        
        <?php if ($permission_arr['publish_enable']) : ?>
        <span class="button  ui-widget-content-1"><a href="javascript: void(0);" rel="unpublish" class="publish_all"><span class="icon unpublish"><?php echo $this->translator->translator('common_unpublish_selected'); ?></span></a></span>
        <?php endif; ?>
        
        <?php if ($permission_arr['delete_enable']) : ?>
        <span class="button  ui-widget-content-1"><a href="javascript: void(0);" class="delete_all"><span class="icon delete"><?php echo html_entity_decode($this->translator->translator("common_delete_selected"), ENT_QUOTES, "UTF-8"); ?></span></a></span>
        <?php endif; ?>
    </div>
</div>
<?php endif; ?>

<div id="dialog_container" title="<?php echo $this->translator->translator('common_dialog_msg',$this->translator->translator('property_category_list_page_name')); ?>">	
</div>
<div id="dialog-confirm" title="<?php echo $this->translator->translator('common_confirmation',$this->translator->translator('common_delete')); ?>"></div>
</div>	